package com.ds.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * @program: Spring-Study
 * @description:
 * @author: Dawson.Zhang
 * @create: 2020-04-04
 **/
public class BefourLogger implements MethodBeforeAdvice {
    private static final Logger log = LoggerFactory.getLogger(BefourLogger.class);
    //method : 要执行的目标对象的方法
    //args : 参数
    //target : 目标
    public void before(Method method, Object[] objects, Object target) throws Throwable {
        log.debug("前置通知"+target.getClass().getName()+"的"+method.getName()+"被执行了");
    }
}
